package com.disruptor.sample._08complex01.consumer;

import com.disruptor.sample._07advance.dto.Trade;
import com.lmax.disruptor.EventHandler;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Handler2 implements EventHandler<Trade> {

  @Override
  public void onEvent(Trade event, long sequence,  boolean endOfBatch) throws Exception {
    log.info("handler2: set price");
    event.setPrice(17.0);
    Thread.sleep(1000);
  }

}
